package com.haiya.observer.bellcase;

public class Client {
    public static void main(String[] args) {
        TeacherEventListener teacher = new TeacherEventListener();
        StudentEventListener students = new StudentEventListener();
        RingEventSource eventSource = new RingEventSource();
        eventSource.addListener(teacher);
        eventSource.addListener(students);
        eventSource.ring("上课");
        eventSource.ring("下课");
    }
}
